<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/vue.js"></script>
</head>
<body>
<div id="app">
    <comp> <button slot="left">替换左边</button><span slot="center">替换中间</span><b slot="right">替换右边</b></comp>
    <comp><ul slot="left"><li v-for="item in list">{{item}}</li></ul></comp>
</div>
<template id="comp">
    <div>
        <slot name="left"><button>左边</button></slot>
        <slot name="center"><button>中间</button></slot>
        <slot name="right"><button>右边</button></slot>
    </div>
</template>
<script>
    let vm = new Vue({
        el:'#app',
        data:{
            message:'++++++++++',
            list:['111',222,333]
        },
        components:{
            comp:{
                template:'#comp',
                data(){
                    return{
                        msg:'呵呵'
                    }
                }
            }
        }
    })
</script>
</body>
</html>
